package com.zshan.clinic.database.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class StockDrugUsageExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public StockDrugUsageExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andUsageIdIsNull() {
            addCriterion("usage_id is null");
            return (Criteria) this;
        }

        public Criteria andUsageIdIsNotNull() {
            addCriterion("usage_id is not null");
            return (Criteria) this;
        }

        public Criteria andUsageIdEqualTo(Long value) {
            addCriterion("usage_id =", value, "usageId");
            return (Criteria) this;
        }

        public Criteria andUsageIdNotEqualTo(Long value) {
            addCriterion("usage_id <>", value, "usageId");
            return (Criteria) this;
        }

        public Criteria andUsageIdGreaterThan(Long value) {
            addCriterion("usage_id >", value, "usageId");
            return (Criteria) this;
        }

        public Criteria andUsageIdGreaterThanOrEqualTo(Long value) {
            addCriterion("usage_id >=", value, "usageId");
            return (Criteria) this;
        }

        public Criteria andUsageIdLessThan(Long value) {
            addCriterion("usage_id <", value, "usageId");
            return (Criteria) this;
        }

        public Criteria andUsageIdLessThanOrEqualTo(Long value) {
            addCriterion("usage_id <=", value, "usageId");
            return (Criteria) this;
        }

        public Criteria andUsageIdIn(List<Long> values) {
            addCriterion("usage_id in", values, "usageId");
            return (Criteria) this;
        }

        public Criteria andUsageIdNotIn(List<Long> values) {
            addCriterion("usage_id not in", values, "usageId");
            return (Criteria) this;
        }

        public Criteria andUsageIdBetween(Long value1, Long value2) {
            addCriterion("usage_id between", value1, value2, "usageId");
            return (Criteria) this;
        }

        public Criteria andUsageIdNotBetween(Long value1, Long value2) {
            addCriterion("usage_id not between", value1, value2, "usageId");
            return (Criteria) this;
        }

        public Criteria andDrugIdIsNull() {
            addCriterion("drug_id is null");
            return (Criteria) this;
        }

        public Criteria andDrugIdIsNotNull() {
            addCriterion("drug_id is not null");
            return (Criteria) this;
        }

        public Criteria andDrugIdEqualTo(Long value) {
            addCriterion("drug_id =", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdNotEqualTo(Long value) {
            addCriterion("drug_id <>", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdGreaterThan(Long value) {
            addCriterion("drug_id >", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdGreaterThanOrEqualTo(Long value) {
            addCriterion("drug_id >=", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdLessThan(Long value) {
            addCriterion("drug_id <", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdLessThanOrEqualTo(Long value) {
            addCriterion("drug_id <=", value, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdIn(List<Long> values) {
            addCriterion("drug_id in", values, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdNotIn(List<Long> values) {
            addCriterion("drug_id not in", values, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdBetween(Long value1, Long value2) {
            addCriterion("drug_id between", value1, value2, "drugId");
            return (Criteria) this;
        }

        public Criteria andDrugIdNotBetween(Long value1, Long value2) {
            addCriterion("drug_id not between", value1, value2, "drugId");
            return (Criteria) this;
        }

        public Criteria andUsageCodeIsNull() {
            addCriterion("usage_code is null");
            return (Criteria) this;
        }

        public Criteria andUsageCodeIsNotNull() {
            addCriterion("usage_code is not null");
            return (Criteria) this;
        }

        public Criteria andUsageCodeEqualTo(String value) {
            addCriterion("usage_code =", value, "usageCode");
            return (Criteria) this;
        }

        public Criteria andUsageCodeNotEqualTo(String value) {
            addCriterion("usage_code <>", value, "usageCode");
            return (Criteria) this;
        }

        public Criteria andUsageCodeGreaterThan(String value) {
            addCriterion("usage_code >", value, "usageCode");
            return (Criteria) this;
        }

        public Criteria andUsageCodeGreaterThanOrEqualTo(String value) {
            addCriterion("usage_code >=", value, "usageCode");
            return (Criteria) this;
        }

        public Criteria andUsageCodeLessThan(String value) {
            addCriterion("usage_code <", value, "usageCode");
            return (Criteria) this;
        }

        public Criteria andUsageCodeLessThanOrEqualTo(String value) {
            addCriterion("usage_code <=", value, "usageCode");
            return (Criteria) this;
        }

        public Criteria andUsageCodeLike(String value) {
            addCriterion("usage_code like", value, "usageCode");
            return (Criteria) this;
        }

        public Criteria andUsageCodeNotLike(String value) {
            addCriterion("usage_code not like", value, "usageCode");
            return (Criteria) this;
        }

        public Criteria andUsageCodeIn(List<String> values) {
            addCriterion("usage_code in", values, "usageCode");
            return (Criteria) this;
        }

        public Criteria andUsageCodeNotIn(List<String> values) {
            addCriterion("usage_code not in", values, "usageCode");
            return (Criteria) this;
        }

        public Criteria andUsageCodeBetween(String value1, String value2) {
            addCriterion("usage_code between", value1, value2, "usageCode");
            return (Criteria) this;
        }

        public Criteria andUsageCodeNotBetween(String value1, String value2) {
            addCriterion("usage_code not between", value1, value2, "usageCode");
            return (Criteria) this;
        }

        public Criteria andSingleMinIsNull() {
            addCriterion("single_min is null");
            return (Criteria) this;
        }

        public Criteria andSingleMinIsNotNull() {
            addCriterion("single_min is not null");
            return (Criteria) this;
        }

        public Criteria andSingleMinEqualTo(BigDecimal value) {
            addCriterion("single_min =", value, "singleMin");
            return (Criteria) this;
        }

        public Criteria andSingleMinNotEqualTo(BigDecimal value) {
            addCriterion("single_min <>", value, "singleMin");
            return (Criteria) this;
        }

        public Criteria andSingleMinGreaterThan(BigDecimal value) {
            addCriterion("single_min >", value, "singleMin");
            return (Criteria) this;
        }

        public Criteria andSingleMinGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("single_min >=", value, "singleMin");
            return (Criteria) this;
        }

        public Criteria andSingleMinLessThan(BigDecimal value) {
            addCriterion("single_min <", value, "singleMin");
            return (Criteria) this;
        }

        public Criteria andSingleMinLessThanOrEqualTo(BigDecimal value) {
            addCriterion("single_min <=", value, "singleMin");
            return (Criteria) this;
        }

        public Criteria andSingleMinIn(List<BigDecimal> values) {
            addCriterion("single_min in", values, "singleMin");
            return (Criteria) this;
        }

        public Criteria andSingleMinNotIn(List<BigDecimal> values) {
            addCriterion("single_min not in", values, "singleMin");
            return (Criteria) this;
        }

        public Criteria andSingleMinBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("single_min between", value1, value2, "singleMin");
            return (Criteria) this;
        }

        public Criteria andSingleMinNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("single_min not between", value1, value2, "singleMin");
            return (Criteria) this;
        }

        public Criteria andSingleMaxIsNull() {
            addCriterion("single_max is null");
            return (Criteria) this;
        }

        public Criteria andSingleMaxIsNotNull() {
            addCriterion("single_max is not null");
            return (Criteria) this;
        }

        public Criteria andSingleMaxEqualTo(BigDecimal value) {
            addCriterion("single_max =", value, "singleMax");
            return (Criteria) this;
        }

        public Criteria andSingleMaxNotEqualTo(BigDecimal value) {
            addCriterion("single_max <>", value, "singleMax");
            return (Criteria) this;
        }

        public Criteria andSingleMaxGreaterThan(BigDecimal value) {
            addCriterion("single_max >", value, "singleMax");
            return (Criteria) this;
        }

        public Criteria andSingleMaxGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("single_max >=", value, "singleMax");
            return (Criteria) this;
        }

        public Criteria andSingleMaxLessThan(BigDecimal value) {
            addCriterion("single_max <", value, "singleMax");
            return (Criteria) this;
        }

        public Criteria andSingleMaxLessThanOrEqualTo(BigDecimal value) {
            addCriterion("single_max <=", value, "singleMax");
            return (Criteria) this;
        }

        public Criteria andSingleMaxIn(List<BigDecimal> values) {
            addCriterion("single_max in", values, "singleMax");
            return (Criteria) this;
        }

        public Criteria andSingleMaxNotIn(List<BigDecimal> values) {
            addCriterion("single_max not in", values, "singleMax");
            return (Criteria) this;
        }

        public Criteria andSingleMaxBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("single_max between", value1, value2, "singleMax");
            return (Criteria) this;
        }

        public Criteria andSingleMaxNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("single_max not between", value1, value2, "singleMax");
            return (Criteria) this;
        }

        public Criteria andDailyMinIsNull() {
            addCriterion("daily_min is null");
            return (Criteria) this;
        }

        public Criteria andDailyMinIsNotNull() {
            addCriterion("daily_min is not null");
            return (Criteria) this;
        }

        public Criteria andDailyMinEqualTo(BigDecimal value) {
            addCriterion("daily_min =", value, "dailyMin");
            return (Criteria) this;
        }

        public Criteria andDailyMinNotEqualTo(BigDecimal value) {
            addCriterion("daily_min <>", value, "dailyMin");
            return (Criteria) this;
        }

        public Criteria andDailyMinGreaterThan(BigDecimal value) {
            addCriterion("daily_min >", value, "dailyMin");
            return (Criteria) this;
        }

        public Criteria andDailyMinGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("daily_min >=", value, "dailyMin");
            return (Criteria) this;
        }

        public Criteria andDailyMinLessThan(BigDecimal value) {
            addCriterion("daily_min <", value, "dailyMin");
            return (Criteria) this;
        }

        public Criteria andDailyMinLessThanOrEqualTo(BigDecimal value) {
            addCriterion("daily_min <=", value, "dailyMin");
            return (Criteria) this;
        }

        public Criteria andDailyMinIn(List<BigDecimal> values) {
            addCriterion("daily_min in", values, "dailyMin");
            return (Criteria) this;
        }

        public Criteria andDailyMinNotIn(List<BigDecimal> values) {
            addCriterion("daily_min not in", values, "dailyMin");
            return (Criteria) this;
        }

        public Criteria andDailyMinBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("daily_min between", value1, value2, "dailyMin");
            return (Criteria) this;
        }

        public Criteria andDailyMinNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("daily_min not between", value1, value2, "dailyMin");
            return (Criteria) this;
        }

        public Criteria andDailyMaxIsNull() {
            addCriterion("daily_max is null");
            return (Criteria) this;
        }

        public Criteria andDailyMaxIsNotNull() {
            addCriterion("daily_max is not null");
            return (Criteria) this;
        }

        public Criteria andDailyMaxEqualTo(BigDecimal value) {
            addCriterion("daily_max =", value, "dailyMax");
            return (Criteria) this;
        }

        public Criteria andDailyMaxNotEqualTo(BigDecimal value) {
            addCriterion("daily_max <>", value, "dailyMax");
            return (Criteria) this;
        }

        public Criteria andDailyMaxGreaterThan(BigDecimal value) {
            addCriterion("daily_max >", value, "dailyMax");
            return (Criteria) this;
        }

        public Criteria andDailyMaxGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("daily_max >=", value, "dailyMax");
            return (Criteria) this;
        }

        public Criteria andDailyMaxLessThan(BigDecimal value) {
            addCriterion("daily_max <", value, "dailyMax");
            return (Criteria) this;
        }

        public Criteria andDailyMaxLessThanOrEqualTo(BigDecimal value) {
            addCriterion("daily_max <=", value, "dailyMax");
            return (Criteria) this;
        }

        public Criteria andDailyMaxIn(List<BigDecimal> values) {
            addCriterion("daily_max in", values, "dailyMax");
            return (Criteria) this;
        }

        public Criteria andDailyMaxNotIn(List<BigDecimal> values) {
            addCriterion("daily_max not in", values, "dailyMax");
            return (Criteria) this;
        }

        public Criteria andDailyMaxBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("daily_max between", value1, value2, "dailyMax");
            return (Criteria) this;
        }

        public Criteria andDailyMaxNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("daily_max not between", value1, value2, "dailyMax");
            return (Criteria) this;
        }

        public Criteria andMinAgeYearIsNull() {
            addCriterion("min_age_year is null");
            return (Criteria) this;
        }

        public Criteria andMinAgeYearIsNotNull() {
            addCriterion("min_age_year is not null");
            return (Criteria) this;
        }

        public Criteria andMinAgeYearEqualTo(Integer value) {
            addCriterion("min_age_year =", value, "minAgeYear");
            return (Criteria) this;
        }

        public Criteria andMinAgeYearNotEqualTo(Integer value) {
            addCriterion("min_age_year <>", value, "minAgeYear");
            return (Criteria) this;
        }

        public Criteria andMinAgeYearGreaterThan(Integer value) {
            addCriterion("min_age_year >", value, "minAgeYear");
            return (Criteria) this;
        }

        public Criteria andMinAgeYearGreaterThanOrEqualTo(Integer value) {
            addCriterion("min_age_year >=", value, "minAgeYear");
            return (Criteria) this;
        }

        public Criteria andMinAgeYearLessThan(Integer value) {
            addCriterion("min_age_year <", value, "minAgeYear");
            return (Criteria) this;
        }

        public Criteria andMinAgeYearLessThanOrEqualTo(Integer value) {
            addCriterion("min_age_year <=", value, "minAgeYear");
            return (Criteria) this;
        }

        public Criteria andMinAgeYearIn(List<Integer> values) {
            addCriterion("min_age_year in", values, "minAgeYear");
            return (Criteria) this;
        }

        public Criteria andMinAgeYearNotIn(List<Integer> values) {
            addCriterion("min_age_year not in", values, "minAgeYear");
            return (Criteria) this;
        }

        public Criteria andMinAgeYearBetween(Integer value1, Integer value2) {
            addCriterion("min_age_year between", value1, value2, "minAgeYear");
            return (Criteria) this;
        }

        public Criteria andMinAgeYearNotBetween(Integer value1, Integer value2) {
            addCriterion("min_age_year not between", value1, value2, "minAgeYear");
            return (Criteria) this;
        }

        public Criteria andMinAgeMonthIsNull() {
            addCriterion("min_age_month is null");
            return (Criteria) this;
        }

        public Criteria andMinAgeMonthIsNotNull() {
            addCriterion("min_age_month is not null");
            return (Criteria) this;
        }

        public Criteria andMinAgeMonthEqualTo(Integer value) {
            addCriterion("min_age_month =", value, "minAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMinAgeMonthNotEqualTo(Integer value) {
            addCriterion("min_age_month <>", value, "minAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMinAgeMonthGreaterThan(Integer value) {
            addCriterion("min_age_month >", value, "minAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMinAgeMonthGreaterThanOrEqualTo(Integer value) {
            addCriterion("min_age_month >=", value, "minAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMinAgeMonthLessThan(Integer value) {
            addCriterion("min_age_month <", value, "minAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMinAgeMonthLessThanOrEqualTo(Integer value) {
            addCriterion("min_age_month <=", value, "minAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMinAgeMonthIn(List<Integer> values) {
            addCriterion("min_age_month in", values, "minAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMinAgeMonthNotIn(List<Integer> values) {
            addCriterion("min_age_month not in", values, "minAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMinAgeMonthBetween(Integer value1, Integer value2) {
            addCriterion("min_age_month between", value1, value2, "minAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMinAgeMonthNotBetween(Integer value1, Integer value2) {
            addCriterion("min_age_month not between", value1, value2, "minAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMaxAgeYearIsNull() {
            addCriterion("max_age_year is null");
            return (Criteria) this;
        }

        public Criteria andMaxAgeYearIsNotNull() {
            addCriterion("max_age_year is not null");
            return (Criteria) this;
        }

        public Criteria andMaxAgeYearEqualTo(Integer value) {
            addCriterion("max_age_year =", value, "maxAgeYear");
            return (Criteria) this;
        }

        public Criteria andMaxAgeYearNotEqualTo(Integer value) {
            addCriterion("max_age_year <>", value, "maxAgeYear");
            return (Criteria) this;
        }

        public Criteria andMaxAgeYearGreaterThan(Integer value) {
            addCriterion("max_age_year >", value, "maxAgeYear");
            return (Criteria) this;
        }

        public Criteria andMaxAgeYearGreaterThanOrEqualTo(Integer value) {
            addCriterion("max_age_year >=", value, "maxAgeYear");
            return (Criteria) this;
        }

        public Criteria andMaxAgeYearLessThan(Integer value) {
            addCriterion("max_age_year <", value, "maxAgeYear");
            return (Criteria) this;
        }

        public Criteria andMaxAgeYearLessThanOrEqualTo(Integer value) {
            addCriterion("max_age_year <=", value, "maxAgeYear");
            return (Criteria) this;
        }

        public Criteria andMaxAgeYearIn(List<Integer> values) {
            addCriterion("max_age_year in", values, "maxAgeYear");
            return (Criteria) this;
        }

        public Criteria andMaxAgeYearNotIn(List<Integer> values) {
            addCriterion("max_age_year not in", values, "maxAgeYear");
            return (Criteria) this;
        }

        public Criteria andMaxAgeYearBetween(Integer value1, Integer value2) {
            addCriterion("max_age_year between", value1, value2, "maxAgeYear");
            return (Criteria) this;
        }

        public Criteria andMaxAgeYearNotBetween(Integer value1, Integer value2) {
            addCriterion("max_age_year not between", value1, value2, "maxAgeYear");
            return (Criteria) this;
        }

        public Criteria andMaxAgeMonthIsNull() {
            addCriterion("max_age_month is null");
            return (Criteria) this;
        }

        public Criteria andMaxAgeMonthIsNotNull() {
            addCriterion("max_age_month is not null");
            return (Criteria) this;
        }

        public Criteria andMaxAgeMonthEqualTo(Integer value) {
            addCriterion("max_age_month =", value, "maxAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMaxAgeMonthNotEqualTo(Integer value) {
            addCriterion("max_age_month <>", value, "maxAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMaxAgeMonthGreaterThan(Integer value) {
            addCriterion("max_age_month >", value, "maxAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMaxAgeMonthGreaterThanOrEqualTo(Integer value) {
            addCriterion("max_age_month >=", value, "maxAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMaxAgeMonthLessThan(Integer value) {
            addCriterion("max_age_month <", value, "maxAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMaxAgeMonthLessThanOrEqualTo(Integer value) {
            addCriterion("max_age_month <=", value, "maxAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMaxAgeMonthIn(List<Integer> values) {
            addCriterion("max_age_month in", values, "maxAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMaxAgeMonthNotIn(List<Integer> values) {
            addCriterion("max_age_month not in", values, "maxAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMaxAgeMonthBetween(Integer value1, Integer value2) {
            addCriterion("max_age_month between", value1, value2, "maxAgeMonth");
            return (Criteria) this;
        }

        public Criteria andMaxAgeMonthNotBetween(Integer value1, Integer value2) {
            addCriterion("max_age_month not between", value1, value2, "maxAgeMonth");
            return (Criteria) this;
        }

        public Criteria andClinicIdIsNull() {
            addCriterion("clinic_id is null");
            return (Criteria) this;
        }

        public Criteria andClinicIdIsNotNull() {
            addCriterion("clinic_id is not null");
            return (Criteria) this;
        }

        public Criteria andClinicIdEqualTo(Long value) {
            addCriterion("clinic_id =", value, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdNotEqualTo(Long value) {
            addCriterion("clinic_id <>", value, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdGreaterThan(Long value) {
            addCriterion("clinic_id >", value, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdGreaterThanOrEqualTo(Long value) {
            addCriterion("clinic_id >=", value, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdLessThan(Long value) {
            addCriterion("clinic_id <", value, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdLessThanOrEqualTo(Long value) {
            addCriterion("clinic_id <=", value, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdIn(List<Long> values) {
            addCriterion("clinic_id in", values, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdNotIn(List<Long> values) {
            addCriterion("clinic_id not in", values, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdBetween(Long value1, Long value2) {
            addCriterion("clinic_id between", value1, value2, "clinicId");
            return (Criteria) this;
        }

        public Criteria andClinicIdNotBetween(Long value1, Long value2) {
            addCriterion("clinic_id not between", value1, value2, "clinicId");
            return (Criteria) this;
        }

        public Criteria andIsEnabledIsNull() {
            addCriterion("is_enabled is null");
            return (Criteria) this;
        }

        public Criteria andIsEnabledIsNotNull() {
            addCriterion("is_enabled is not null");
            return (Criteria) this;
        }

        public Criteria andIsEnabledEqualTo(String value) {
            addCriterion("is_enabled =", value, "isEnabled");
            return (Criteria) this;
        }

        public Criteria andIsEnabledNotEqualTo(String value) {
            addCriterion("is_enabled <>", value, "isEnabled");
            return (Criteria) this;
        }

        public Criteria andIsEnabledGreaterThan(String value) {
            addCriterion("is_enabled >", value, "isEnabled");
            return (Criteria) this;
        }

        public Criteria andIsEnabledGreaterThanOrEqualTo(String value) {
            addCriterion("is_enabled >=", value, "isEnabled");
            return (Criteria) this;
        }

        public Criteria andIsEnabledLessThan(String value) {
            addCriterion("is_enabled <", value, "isEnabled");
            return (Criteria) this;
        }

        public Criteria andIsEnabledLessThanOrEqualTo(String value) {
            addCriterion("is_enabled <=", value, "isEnabled");
            return (Criteria) this;
        }

        public Criteria andIsEnabledLike(String value) {
            addCriterion("is_enabled like", value, "isEnabled");
            return (Criteria) this;
        }

        public Criteria andIsEnabledNotLike(String value) {
            addCriterion("is_enabled not like", value, "isEnabled");
            return (Criteria) this;
        }

        public Criteria andIsEnabledIn(List<String> values) {
            addCriterion("is_enabled in", values, "isEnabled");
            return (Criteria) this;
        }

        public Criteria andIsEnabledNotIn(List<String> values) {
            addCriterion("is_enabled not in", values, "isEnabled");
            return (Criteria) this;
        }

        public Criteria andIsEnabledBetween(String value1, String value2) {
            addCriterion("is_enabled between", value1, value2, "isEnabled");
            return (Criteria) this;
        }

        public Criteria andIsEnabledNotBetween(String value1, String value2) {
            addCriterion("is_enabled not between", value1, value2, "isEnabled");
            return (Criteria) this;
        }

        public Criteria andIsDeleteIsNull() {
            addCriterion("is_delete is null");
            return (Criteria) this;
        }

        public Criteria andIsDeleteIsNotNull() {
            addCriterion("is_delete is not null");
            return (Criteria) this;
        }

        public Criteria andIsDeleteEqualTo(String value) {
            addCriterion("is_delete =", value, "isDelete");
            return (Criteria) this;
        }

        public Criteria andIsDeleteNotEqualTo(String value) {
            addCriterion("is_delete <>", value, "isDelete");
            return (Criteria) this;
        }

        public Criteria andIsDeleteGreaterThan(String value) {
            addCriterion("is_delete >", value, "isDelete");
            return (Criteria) this;
        }

        public Criteria andIsDeleteGreaterThanOrEqualTo(String value) {
            addCriterion("is_delete >=", value, "isDelete");
            return (Criteria) this;
        }

        public Criteria andIsDeleteLessThan(String value) {
            addCriterion("is_delete <", value, "isDelete");
            return (Criteria) this;
        }

        public Criteria andIsDeleteLessThanOrEqualTo(String value) {
            addCriterion("is_delete <=", value, "isDelete");
            return (Criteria) this;
        }

        public Criteria andIsDeleteLike(String value) {
            addCriterion("is_delete like", value, "isDelete");
            return (Criteria) this;
        }

        public Criteria andIsDeleteNotLike(String value) {
            addCriterion("is_delete not like", value, "isDelete");
            return (Criteria) this;
        }

        public Criteria andIsDeleteIn(List<String> values) {
            addCriterion("is_delete in", values, "isDelete");
            return (Criteria) this;
        }

        public Criteria andIsDeleteNotIn(List<String> values) {
            addCriterion("is_delete not in", values, "isDelete");
            return (Criteria) this;
        }

        public Criteria andIsDeleteBetween(String value1, String value2) {
            addCriterion("is_delete between", value1, value2, "isDelete");
            return (Criteria) this;
        }

        public Criteria andIsDeleteNotBetween(String value1, String value2) {
            addCriterion("is_delete not between", value1, value2, "isDelete");
            return (Criteria) this;
        }

        public Criteria andCreateUserIdIsNull() {
            addCriterion("create_user_id is null");
            return (Criteria) this;
        }

        public Criteria andCreateUserIdIsNotNull() {
            addCriterion("create_user_id is not null");
            return (Criteria) this;
        }

        public Criteria andCreateUserIdEqualTo(Long value) {
            addCriterion("create_user_id =", value, "createUserId");
            return (Criteria) this;
        }

        public Criteria andCreateUserIdNotEqualTo(Long value) {
            addCriterion("create_user_id <>", value, "createUserId");
            return (Criteria) this;
        }

        public Criteria andCreateUserIdGreaterThan(Long value) {
            addCriterion("create_user_id >", value, "createUserId");
            return (Criteria) this;
        }

        public Criteria andCreateUserIdGreaterThanOrEqualTo(Long value) {
            addCriterion("create_user_id >=", value, "createUserId");
            return (Criteria) this;
        }

        public Criteria andCreateUserIdLessThan(Long value) {
            addCriterion("create_user_id <", value, "createUserId");
            return (Criteria) this;
        }

        public Criteria andCreateUserIdLessThanOrEqualTo(Long value) {
            addCriterion("create_user_id <=", value, "createUserId");
            return (Criteria) this;
        }

        public Criteria andCreateUserIdIn(List<Long> values) {
            addCriterion("create_user_id in", values, "createUserId");
            return (Criteria) this;
        }

        public Criteria andCreateUserIdNotIn(List<Long> values) {
            addCriterion("create_user_id not in", values, "createUserId");
            return (Criteria) this;
        }

        public Criteria andCreateUserIdBetween(Long value1, Long value2) {
            addCriterion("create_user_id between", value1, value2, "createUserId");
            return (Criteria) this;
        }

        public Criteria andCreateUserIdNotBetween(Long value1, Long value2) {
            addCriterion("create_user_id not between", value1, value2, "createUserId");
            return (Criteria) this;
        }

        public Criteria andCreateByIsNull() {
            addCriterion("create_by is null");
            return (Criteria) this;
        }

        public Criteria andCreateByIsNotNull() {
            addCriterion("create_by is not null");
            return (Criteria) this;
        }

        public Criteria andCreateByEqualTo(String value) {
            addCriterion("create_by =", value, "createBy");
            return (Criteria) this;
        }

        public Criteria andCreateByNotEqualTo(String value) {
            addCriterion("create_by <>", value, "createBy");
            return (Criteria) this;
        }

        public Criteria andCreateByGreaterThan(String value) {
            addCriterion("create_by >", value, "createBy");
            return (Criteria) this;
        }

        public Criteria andCreateByGreaterThanOrEqualTo(String value) {
            addCriterion("create_by >=", value, "createBy");
            return (Criteria) this;
        }

        public Criteria andCreateByLessThan(String value) {
            addCriterion("create_by <", value, "createBy");
            return (Criteria) this;
        }

        public Criteria andCreateByLessThanOrEqualTo(String value) {
            addCriterion("create_by <=", value, "createBy");
            return (Criteria) this;
        }

        public Criteria andCreateByLike(String value) {
            addCriterion("create_by like", value, "createBy");
            return (Criteria) this;
        }

        public Criteria andCreateByNotLike(String value) {
            addCriterion("create_by not like", value, "createBy");
            return (Criteria) this;
        }

        public Criteria andCreateByIn(List<String> values) {
            addCriterion("create_by in", values, "createBy");
            return (Criteria) this;
        }

        public Criteria andCreateByNotIn(List<String> values) {
            addCriterion("create_by not in", values, "createBy");
            return (Criteria) this;
        }

        public Criteria andCreateByBetween(String value1, String value2) {
            addCriterion("create_by between", value1, value2, "createBy");
            return (Criteria) this;
        }

        public Criteria andCreateByNotBetween(String value1, String value2) {
            addCriterion("create_by not between", value1, value2, "createBy");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIdIsNull() {
            addCriterion("update_user_id is null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIdIsNotNull() {
            addCriterion("update_user_id is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIdEqualTo(Long value) {
            addCriterion("update_user_id =", value, "updateUserId");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIdNotEqualTo(Long value) {
            addCriterion("update_user_id <>", value, "updateUserId");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIdGreaterThan(Long value) {
            addCriterion("update_user_id >", value, "updateUserId");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIdGreaterThanOrEqualTo(Long value) {
            addCriterion("update_user_id >=", value, "updateUserId");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIdLessThan(Long value) {
            addCriterion("update_user_id <", value, "updateUserId");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIdLessThanOrEqualTo(Long value) {
            addCriterion("update_user_id <=", value, "updateUserId");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIdIn(List<Long> values) {
            addCriterion("update_user_id in", values, "updateUserId");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIdNotIn(List<Long> values) {
            addCriterion("update_user_id not in", values, "updateUserId");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIdBetween(Long value1, Long value2) {
            addCriterion("update_user_id between", value1, value2, "updateUserId");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIdNotBetween(Long value1, Long value2) {
            addCriterion("update_user_id not between", value1, value2, "updateUserId");
            return (Criteria) this;
        }

        public Criteria andUpdateByIsNull() {
            addCriterion("update_by is null");
            return (Criteria) this;
        }

        public Criteria andUpdateByIsNotNull() {
            addCriterion("update_by is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateByEqualTo(String value) {
            addCriterion("update_by =", value, "updateBy");
            return (Criteria) this;
        }

        public Criteria andUpdateByNotEqualTo(String value) {
            addCriterion("update_by <>", value, "updateBy");
            return (Criteria) this;
        }

        public Criteria andUpdateByGreaterThan(String value) {
            addCriterion("update_by >", value, "updateBy");
            return (Criteria) this;
        }

        public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
            addCriterion("update_by >=", value, "updateBy");
            return (Criteria) this;
        }

        public Criteria andUpdateByLessThan(String value) {
            addCriterion("update_by <", value, "updateBy");
            return (Criteria) this;
        }

        public Criteria andUpdateByLessThanOrEqualTo(String value) {
            addCriterion("update_by <=", value, "updateBy");
            return (Criteria) this;
        }

        public Criteria andUpdateByLike(String value) {
            addCriterion("update_by like", value, "updateBy");
            return (Criteria) this;
        }

        public Criteria andUpdateByNotLike(String value) {
            addCriterion("update_by not like", value, "updateBy");
            return (Criteria) this;
        }

        public Criteria andUpdateByIn(List<String> values) {
            addCriterion("update_by in", values, "updateBy");
            return (Criteria) this;
        }

        public Criteria andUpdateByNotIn(List<String> values) {
            addCriterion("update_by not in", values, "updateBy");
            return (Criteria) this;
        }

        public Criteria andUpdateByBetween(String value1, String value2) {
            addCriterion("update_by between", value1, value2, "updateBy");
            return (Criteria) this;
        }

        public Criteria andUpdateByNotBetween(String value1, String value2) {
            addCriterion("update_by not between", value1, value2, "updateBy");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNull() {
            addCriterion("update_time is null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNotNull() {
            addCriterion("update_time is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualTo(Date value) {
            addCriterion("update_time =", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualTo(Date value) {
            addCriterion("update_time <>", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThan(Date value) {
            addCriterion("update_time >", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("update_time >=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThan(Date value) {
            addCriterion("update_time <", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterion("update_time <=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIn(List<Date> values) {
            addCriterion("update_time in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotIn(List<Date> values) {
            addCriterion("update_time not in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
            addCriterion("update_time between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterion("update_time not between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUsageCodeLikeInsensitive(String value) {
            addCriterion("upper(usage_code) like", value.toUpperCase(), "usageCode");
            return (Criteria) this;
        }

        public Criteria andIsEnabledLikeInsensitive(String value) {
            addCriterion("upper(is_enabled) like", value.toUpperCase(), "isEnabled");
            return (Criteria) this;
        }

        public Criteria andIsDeleteLikeInsensitive(String value) {
            addCriterion("upper(is_delete) like", value.toUpperCase(), "isDelete");
            return (Criteria) this;
        }

        public Criteria andCreateByLikeInsensitive(String value) {
            addCriterion("upper(create_by) like", value.toUpperCase(), "createBy");
            return (Criteria) this;
        }

        public Criteria andUpdateByLikeInsensitive(String value) {
            addCriterion("upper(update_by) like", value.toUpperCase(), "updateBy");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}